﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="CreateUser.aspx.cs" Inherits="cognysClient.Admin.WebForm2" validateRequest="false"%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <div id="divMain" class="divMain" runat="server">

        <div id="divCreateUser" class="divCreateUser" runat="server">

            <h2 class="titlePage">Skapa Användare</h2>

            <asp:Label ID="lblFirstName" runat="server" cssClass="lblCreateUser" Text="Förnamn:"></asp:Label>
            <br />

            <asp:TextBox ID="tbFirstName" runat="server" CssClass="tbxCreateUser"></asp:TextBox>
            <br />
            <asp:Label ID="lblLastName" runat="server" cssClass="lblCreateUser" Text="Efternamn:"></asp:Label>
            <br />
            <asp:TextBox ID="tbLastName" runat="server" CssClass="tbxCreateUser"></asp:TextBox>
            <br />
            <asp:Label ID="lblPersonal" runat="server" cssClass="lblCreateUser" Text="Personnummer:"></asp:Label>
            <br />
            <asp:TextBox ID="tbPersonal" runat="server" CssClass="tbxCreateUser" Text=""></asp:TextBox>
            <br />
            <asp:Label ID="lblTestGroup" runat="server" cssClass="lblCreateUser" Text="Patientgrupp:"></asp:Label>
            <br />
            <asp:DropDownList ID="ddlTestGroup" runat="server" CssClass="tbxCreateUser"></asp:DropDownList>
            <br />
            <asp:Label ID="lblUserGroup" runat="server" cssClass="lblCreateUser" Text="Användargrupp:"></asp:Label>
            <br />
            <asp:DropDownList ID="ddlUserGroup" runat="server" CssClass="tbxCreateUser">
                <asp:ListItem>Vuxen</asp:ListItem>
                <asp:ListItem>Barn</asp:ListItem>
            </asp:DropDownList>
            <br />
            <asp:Button ID="btnCreateUser" runat="server" CssClass="btnCreateUser" Text="Skapa Användare" OnClick="btnCreateUser_Click" ValidationGroup="createUser" />
            <br/><br/>
            
        </div>

        <div id="divCreatedUser" class="divCreatedUser" runat="server">
            <asp:ValidationSummary ID="CreateUserValidationSummary" runat="server"  
                         ValidationGroup="createUser"/>
            <asp:Label ID="lblNewUserCreated" runat="server"></asp:Label><br /><br/>
            <asp:Label ID="lblUserName" CssClass="lblCreatedUsed" runat="server" Text=""></asp:Label>
            <asp:Label ID="lblUserNameAnswer" CssClass="lblCreatedUsed" runat="server" Text=""></asp:Label><br />
            <asp:Label ID="lblPassword" CssClass="lblCreatedUsed" runat="server" Text=""></asp:Label>
            <asp:Label ID="lblPasswordAnswer" CssClass="lblCreatedUsed" runat="server" Text=""></asp:Label>

        </div>

    </div>
    
    <asp:RegularExpressionValidator id="RegularExpressionValidator2" runat="server" 
        ErrorMessage="Felaktigt förnamn" 
        ValidationExpression="^([\S\s]{2,25})$" 
        ControlToValidate="tbFirstName" 
        ValidationGroup="createUser"/>
    
    <asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" 
        ErrorMessage="Felaktigt efternamn" 
        ValidationExpression="^([\S\s]{2,25})$" 
        ControlToValidate="tbLastName" 
        ValidationGroup="createUser"/>
    
    <asp:RegularExpressionValidator id="RegularExpressionValidator3" runat="server" 
        ErrorMessage="Felaktigt personnummer" 
        ValidationExpression="^([0-9]{10,10})$" 
        ControlToValidate="tbPersonal" 
        ValidationGroup="createUser"/>
    
    <asp:RequiredFieldValidator   
        ID="RequiredFieldValidator1"  
        runat="server"  
        ControlToValidate="tbFirstName"  
        Text="*"
        ErrorMessage="Förnamn saknas" 
        ValidationGroup="createUser"  />  
    
     <asp:RequiredFieldValidator   
        ID="RequiredFieldValidator2"  
        runat="server"  
        ControlToValidate="tbLastName"  
        Text="*" 
         ErrorMessage="Efternamn saknas" 
         ValidationGroup="createUser" />  
    
     <asp:RequiredFieldValidator   
        ID="RequiredFieldValidator3"  
        runat="server"  
        ControlToValidate="tbPersonal"  
        Text="*" 
         ErrorMessage="Personnummer saknas" 
         ValidationGroup="createUser" />  
        
    
    
</asp:Content>
